<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>promise静态方法</title>
</head>

<body>
  <ul class="my-ul"></ul>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  <script>
    const bjpromise = axios({
      url: 'http://hmajax.itheima.net/api/weather',
      params: { city: '110100' }
    })
    const shpromise = axios({
      url: 'http://hmajax.itheima.net/api/weather',
      params: { city: '310100' }
    })
    const p = Promise.all([bjpromise, shpromise])
    p.then(res => {
      console.log(res)
    }).catch(err => {
      console.dir(err)
    })
  </script>
</body>

</html>